

function _createCommentTable()
{
	var tableView = Titanium.UI.createTableView({
		style: 0
	});
	
	return tableView;
}

function _createCommentTableRows(data)
{
	var arrayWithRows = [];
	
	for (var j = 0; j < data.length; j++)
	{
		arrayWithRows[j] = [];
		for(var i = 0; i < data[j].length; i++)
		{
			var row = Titanium.UI.createTableViewRow({
				height: 'auto',
				className: 'comment-row',
				selectionStyle: Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE
			});
			
			var view = Titanium.UI.createView({ height: 'auto' });
			
			// en nu met de view?
			var nameLabel = Titanium.UI.createLabel({ 
				text: data[j][i].name,
				height: 20,
				top: 5,
				left: 5
			});
			var dateLabel = Titanium.UI.createLabel({ 
				text: data[j][i].date,
				color: '#000',
				right: 5,
				height: nameLabel.height,
				top: nameLabel.top,
				width: 'auto'
			});
			var commentLabel = Titanium.UI.createLabel({ 
				text: data[j][i].comment,
				height: 'auto',
				top: nameLabel.height + 5,
				left: 5,
				right: 5
			});
			
			view.add(nameLabel);
			view.add(commentLabel);
			view.add(dateLabel);
			
			row.add(view);
			
			arrayWithRows[j].push(row);
		}
	}
	
	return arrayWithRows;
}